<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <script type="text/javascript" src="#{request.contextPath}/UI/support/pub.js"/>
        <script type="text/javascript" language="javascript">
            document.onkeydown = function TabReplace() {
                if (event.keyCode == 13) {
                    if (event.srcElement.tagName != 'BUTTON')
                        event.keyCode = 9;
                    else
                        event.srcElement.click();
                }
            }
        </script>
    </ui:define>
    <ui:define name="content">
        <h:form id="form">
            <p:growl id="msgs" showDetail="false"/>
            <p:panel>
                <h:panelGrid id="pgCondition" columns="2" style="width: 100%">
                    <h:panelGrid columns="4">
                        <p:outputLabel value="总包合同：" for="tkcttPkid" />
                        <p:selectOneMenu id="tkcttPkid"
                                         value="#{itemQryByTkMeaCSubStlQAction.strTkcttPkid}">
                            <f:selectItems value="#{itemQryByTkMeaCSubStlQAction.tkcttList}"/>
                        </p:selectOneMenu>
                        <p:outputLabel value="期数编码：" for="periodNo"/>
                        <p:inputText id="periodNo" value="#{itemQryByTkMeaCSubStlQAction.strPeriodNo}"
                                     onclick="WdatePicker({dateFmt:'yyyyMM'})"/>
                    </h:panelGrid>
                    <h:panelGrid columns="1">
                        <p:commandButton id="qryBtn" value="查询"
                                         action="#{itemQryByTkMeaCSubStlQAction.onQueryAction()}"
                                         update="pdt,msgs,pgCondition">
                        </p:commandButton>
                        <p:commandButton id="resetBtn" value="重置"
                                         action="#{itemQryByTkMeaCSubStlQAction.resetAction()}"
                                         update="pgCondition,msgs">
                        </p:commandButton>
                    </h:panelGrid>
                </h:panelGrid>
            </p:panel>
            <h:panelGrid columns="2">
                <p:ajaxStatus style="width:16px;height:16px;">
                    <f:facet name="start">
                        <h:graphicImage value="/images/ajaxloading.gif"/>
                    </f:facet>
                    <f:facet name="complete">
                        <h:outputText value=""/>
                    </f:facet>
                </p:ajaxStatus>
                <p:commandButton value="导出到EXCEL"
                                 action="#{itemQryByTkMeaCSubStlQAction.onExportExcel}"
                                 ajax="false"
                                 rendered="#{itemQryByTkMeaCSubStlQAction.strExportToExcelRendered}">
                </p:commandButton>
            </h:panelGrid>
            <p:dataTable id="pdt" style="width:100%;"
                         value="#{itemQryByTkMeaCSubStlQAction.itemOfTkMeaCSStlQForQueryList}"
                         var="record"
                         rowKey="#{record.strTkctt_Pkid}"
                         selectionMode="single"
                         paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks}
                         {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         paginator="true"
                         paginatorPosition="bottom"
                         rows="15"
                         rowsPerPageTemplate="500,200,100,45,30,15"
                         rowIndexVar="row"
                         emptyMessage="数据记录为空..."
                         scrollable="true">
                <p:column style="width:30px" headerText="序号">
                    <h:outputText value="#{row + 1}"/>
                </p:column>
                <p:column style="width:100px" headerText="总包_编号">
                    <h:outputText value="#{record.strTkctt_No}" escape="false"/>
                </p:column>
                <p:column style="width:200px" headerText="总包_项目名称">
                    <h:outputText value="#{record.strTkctt_Name}"/>
                </p:column>
                <p:column style="width:60px" headerText="总包_单位">
                    <h:outputText value="#{record.strTkctt_Unit}"/>
                </p:column>
                <p:column style="width:80px" headerText="总包_数量">
                    <h:outputText value="#{record.bdTkctt_ContractQuantity}" style="float: right" >
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
                <p:column style="width:80px" headerText="成本_数量">
                    <h:outputText value="#{record.bdCstpl_ContractQuantity}" style="float: right" >
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
                <p:column style="width:100px" headerText="计量_本期数量">
                    <h:outputText value="#{record.bdTkcttStl_CurrentPeriodMeaQuantity}" style="float: right" >
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
                <p:column style="width:100px" headerText="计量_累计数量">
                    <h:outputText value="#{record.bdTkcttStl_BeginToCurrentPeriodMeaQuantity}" style="float: right" >
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
                <p:column style="width:120px" headerText="分包结算_本期数量">
                    <h:outputText value="#{record.bdSubcttStl_CurrentPeriodQQty}" style="float: right" >
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
                <p:column style="width:120px" headerText="分包结算_累计数量">
                    <h:outputText value="#{record.bdSubcttStl_BeginToCurrentPeriodQQty}" style="float: right" >
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
                <p:column style="width:250px" headerText="协作单位">
                    <h:outputText value="#{record.strSubctt_SignPartName}" style="text-align:left">
                    </h:outputText>
                </p:column>
                <p:column style="width:150px" headerText="计量分包结算比较＿数量">
                    <h:outputText value="#{record.bdMeaS_BeginToCurrentPeriodQQty}" style="float: right" >
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
                <p:column style="width:80px" headerText="备注">
                    <h:outputText value="#{record.strNote}" style="text-align:left">
                    </h:outputText>
                </p:column>
            </p:dataTable>
        </h:form>
    </ui:define>
</ui:composition>